package com.blog.service.impl;

import com.blog.mapper.ArticleMapper;
import com.blog.pojo.Article;
import com.blog.pojo.ArticleComment;
import com.blog.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: VE
 * @DATE: 2022/10/11 15:07
 * 描述:
 */
@Service
public class ArticleServiceImpl implements ArticleService {

    @Autowired
    private ArticleMapper articleMapper;
    @Override
    public Object insert(Article article) {
        return null;
    }

    @Override
    public Object delete(int id) {
        return null;
    }

    @Override
    public Object update(Article article) {
        return null;
    }

    @Override
    public Article load(int id) {
        return articleMapper.load(id);
    }

    @Override
    public List<Article> findAllArticle() {
        return articleMapper.findAllArticle();
    }

    @Override
    public List<Article> findArticleByUid(Integer uid) {
        return articleMapper.findArticleByUid(uid);
    }

    @Override
    public List<ArticleComment> findAllCommentByAid(Integer aid) {
        return articleMapper.findAllCommentByAid(aid);
    }
}
